package com.cmnit.analysis.dao

import com.cmnit.analysis.common.{TDao, TSql}
import org.apache.log4j.Logger
import org.apache.spark.sql.DataFrame

class NsattleMentSumDao extends TSql with TDao {
  private val logger: Logger = Logger.getLogger(this.getClass)

  /**
   * 资金结算汇总表
   */
  def nsattleMentSumInfo(sqlTime: String): DataFrame = {
    sparkSQL(
      "SELECT " +
        "batchnum, " +
        "ordernum, " +
        "cenbatchnum, " +
        "SUBSTR(sumdate,0,10) sumdate, " +
        "transfertype, " +
        "paytype, " +
        "sumtype, " +
        "begindate, " +
        "enddate, " +
        "roadid, " +
        "ownerid, " +
        "cropid, " +
        "splitmoney, " +
        "rate, " +
        "ownermoney, " +
        "cenmoney, " +
        "specialfund, " +
        "taskno, " +
        "profitflag, " +
        "spare1, " +
        "spare2, " +
        "spare3, " +
        "spare4, " +
        "clearingbegindate, " +
        "clearingenddate, " +
        "status, " +
        "lastver, " +
        "cenlastmoney, " +
        "cenlastbatch, " +
        "remarks, " +
        "realcenmoney " +
        "FROM " +
        "clear.tbl_nsattlementsum " +
        "WHERE "
        + sqlTime
    )
  }
}
